import React,{Component } from 'react';
import {Switch,Redirect,NavLink,DirectLink} from 'react-router-dom';
import {Route} from 'react-router';
import AdminUser from './AdminUser'
import Feedback from './Feedback';
import './Index.css'

const Search=()=>{
    return(
        <div className="navSerach">
            <NavLink to='/home' >
                回到首页
            </NavLink>
           
            <NavLink to='/home/system/adminuser' activeStyle={{color:'pink'}}>
                管理员用户
            </NavLink>

            <NavLink to='/home/system/feedback' activeStyle={{color:'pink'}}>
                用户反馈
            </NavLink>
             
        </div>
    )
}

const  System = () => {
    return (
        <div className="System_container">
            <Search/>
            <Switch>
                <Route exact path='/home/system' render={() => {
                    return <Redirect to="/home/system/adminuser"/>
                }}></Route>
                <Route path='/home/system/adminuser'><AdminUser/></Route>
                <Route path='/home/system/feedback'><Feedback/></Route>
            </Switch>
            
        </div>
      
    )
}

export default System;


